package com.hice.demo.java.design.pattern.strategy;

/**
 * 策略模式-辅助类
 *
 * Created by echal on 2016/2/2.
 */
public abstract class AbstractCalculator {

    /**
     * 对象转化处理
     * @param exp
     * @param opt
     * @return
     */
    public int[] split(String exp,String opt){
        String array[] = exp.split(opt);
        int arrayInt[] = new int[2];
        arrayInt[0] = Integer.parseInt(array[0]);
        arrayInt[1] = Integer.parseInt(array[1]);
        return arrayInt;
    }

}
